<?php

namespace app\api\controller\ec;

use app\common\controller\Api;
use app\common\exception\UploadException;
use think\Config;
use think\Hook;
use ec\Ecbase as Eccommon;

/**
 * 公共接口
 */
class Ecbase extends Api {

    protected $noNeedLogin = ['*'];
    protected $noNeedRight = '*';
    
    public $ecObj = null;
    
    
    public $optUserId = '20671449';

    public function _initialize() {

        if (isset($_SERVER['HTTP_ORIGIN'])) {
            header('Access-Control-Expose-Headers: __token__'); //跨域让客户端获取到
        }
        //跨域检测
        check_cors_request();
        $this->ecObj = new Eccommon();

        parent::_initialize();
    }

    

}
